<?php
namespace App\Providers;

use Carbon\Laravel\ServiceProvider;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\RotatingFileHandler;
use Monolog\Processor\IntrospectionProcessor;

class LogServiceProvider extends ServiceProvider
{
    public function boot()
    {
        $handlers[] = (new RotatingFileHandler(storage_path('logs/git_pull.log'), 0))
            ->pushProcessor(new IntrospectionProcessor())
            ->setFormatter(new LineFormatter(null, null, true, true));

        $this->app['log']->setHandlers($handlers);
    }
}
